xl: return(N) from individual commands to top level instead of exit(N)
authorIan Campbell <ian.campbell@citrix.com>
Fri, 30 Jul 2010 14:15:24 +0000 (15:15 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 30 Jul 2010 14:15:24 +0000 (15:15 +0100)
commitd69dea6e515ffc08cb701da7cbe0e1be0cef0f9c
treeee2a5b09421fb5408f4240d1455d0c2c8428177c
parentdf860e4dc271feeeff4f0de43bc2ab6654c0ec41
xl: return(N) from individual commands to top level instead of exit(N)

This allows the top level command dispatcher to cleanup some of its
own allocations.

This is a fairly mechanical conversion of exit(FOO) into return FOO
for the top-level command functions (i.e. main_*). There are still
code paths which will exit() further down the call chains which will
require actual thought.

At first glance not all the return codes are which one would normally
expect for process exit codes (e.g. some are negative) but I didn't
attempt to address that here.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c